package com.ckk.eurekaclient.controller;

import com.ckk.eurekaclient.pojo.RespBean;
import com.ckk.eurekaclient.service.IMarkerService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;


/**
 * 
 * @author zhujunjun
 * @date 2021/05/20 09:12
 **/
@Api(tags = "标记点")
@RequestMapping("map/mark")
@RestController
public class MarkerController {

    @Autowired
    private IMarkerService markerService;

    @ApiOperation(value = "获取标记点")
    @GetMapping("/getMarker")
    public RespBean getMarker() {
        return RespBean.success("获取成功", markerService.getMark());
    }

    @ApiOperation(value = "通过layer获取标记点")
    @GetMapping("/getMarkerByLayer")
    public RespBean getMarkerByLayer(String id) {
        return RespBean.success("获取成功", markerService.getMarkByLayer(id));
    }





    @ApiOperation(value = "复制标记点")
    @ApiIgnore
    @GetMapping("/copyMarker")
    public RespBean copyMarker() {
        markerService.copyMarker();
        return RespBean.success("获取成功");
    }

    @ApiOperation(value = "填充图片字段")
    @ApiIgnore
    @GetMapping("/fillMarker")
    public RespBean fillMarker() {
        markerService.fillMarker();
        return RespBean.success("填充成功");
    }
}